#include <stdio.h>
#include <time.h>

int main(void)
{
    clock_t start_clock = clock();

    int i, d, n = 100000, j = 0, k = 0;

    //printf("Enter number n: ");
    //scanf("%d", &n);

    for (i = 2; i < n; i++)
    {
        for (d = 2; d < i; d++)
            if (i % d == 0)
                break;
        if (d < i)
            j = j + 1;
        else
            k = k + 1;
    }

    printf("There are %d prime number and %d composite number between 1 and %d\n", k, j, n);
    printf("Time used = %.5f\n", (double)(clock() - start_clock) / CLOCKS_PER_SEC);

    return 0;
}
